package SytemAndRuntime;

import java.util.Properties;
import java.util.Set;

public class Example09 {
    public static void main(String[] args) {
        //获取当前系统属性
        Properties properties =System.getProperties();
        System.out.println(properties);
        //获取所有系统属性的key(属性名)，返回set对象
        Set<String>propertyName = properties.stringPropertyNames();
        for (String key:propertyName){
            String value = System.getProperty(key);
            System.out.println(key+"--->"+value);
        }
    }
}
